﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace Be.Windows.Forms
{
    internal static class CaretHelper
    {
        public static void CreateCaret(Control control, int width, int height)
        {
            if (UnixHelper.IsUnix)
                UnixHelper.CreateCaret(control, width, height);
            else
                NativeMethods.CreateCaret(control.Handle, IntPtr.Zero, width, height);
        }

        public static void ShowCaret(Control control)
        {
            if (UnixHelper.IsUnix)
                UnixHelper.ShowCaret(control);
            else
                NativeMethods.ShowCaret(control.Handle);
        }

        public static void DestroyCaret()
        {
            if (UnixHelper.IsUnix)
                UnixHelper.DestroyCaret();
            else
                NativeMethods.DestroyCaret();
        }

        public static void SetCaretPos(int x, int y)
        {
            if (UnixHelper.IsUnix)
                UnixHelper.SetCaretPos(x, y);
            else
                NativeMethods.SetCaretPos(x, y);
        }
    }
}
